import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/sys-user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/sys-user/queryUserInfo',
    method: 'get',
    params: { token }
  })
}
// 退出登录
export const logout = () => request({ url: '/sys-user/logout', method: 'post' })

// 获取用户列表
export const queryList = (param) => request({ url: "/sys-user/queryList", params: param, method: "post" })

// 修改或更新用户
export const updateOrSave = (param) => request({url:"/sys-user/updateOrSave",params:param,method:"post"})

// 修改或更新用户
export const deleteUser = (id) => request({url:`/sys-user/delete?id=${id}`,method:"post"})

